package com.cy.pj.sys.pojo;

import java.io.Serializable;
import java.util.List;

import lombok.Data;
@Data
public class PageObject<T> implements Serializable {
	/**
	 * 类名<泛型>：类泛型用于约束类中属性，方法参数，方法的返回值类型
	 * PageObject 为业务层封装分页相关数据的一个BO对象
	 */
	
	private static final long serialVersionUID = 9167574049092440510L;




	//当前页的页码值
	private Integer pageCurrent=1;
	//页面大小
	private Integer pageSize=3;
	//总行数
	private Integer rowCount=0;
	//总页数
	private Integer pageCount=0;
	//当前页记录
	private List<T> records;
	
	public PageObject() {}
	public PageObject(Integer pageCurrent, Integer pageSize, Integer rowCount, List<T> records) {
		super();
		this.pageCurrent = pageCurrent;
		this.pageSize = pageSize;
		this.rowCount = rowCount;
		this.records = records;
		this.pageCount=(rowCount-1)/pageSize+1;
	}
	
	
}
